<?php
/**
 * Maintenance Screen
 */
use Fox\Grid\FieldCat\Field;
use Fox\Html\Screen\Maintenance;
use Fox\Document\Type;
use Fox\Generator;

$title = "Documents Type";//@TODO Translate

$maintenance = new Maintenance(new Type(), 'documents','types');
$maintenance->grid()->fieldcat()
->add(new Field("doc_grouping","category"),null,0);
$maintenance->grid()->fieldcat()->add(new Field("label","description"),null,1);
$maintenance->grid()->fieldcat()->field('category')
->width(10)
->align('left')
->setGenerator(Generator::useFunction(function($data){
	return $data->category()->label;
}));
echo $maintenance->render(null,array("description" => false));